<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-proCamera-add"  autocomplete="off">
			<div class="form-group">	
				<label class="col-sm-3 control-label">摄像头编码：</label>
				<div class="col-sm-8">
					<input id="cameraCode" name="cameraCode" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">摄像头名称：</label>
				<div class="col-sm-8">
					<input id="cameraName" name="cameraName" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">IP地址：</label>
				<div class="col-sm-8">
					<input id="ip" name="ip" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">端口号：</label>
				<div class="col-sm-8">
					<input id="port" name="port" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">账号：</label>
				<div class="col-sm-8">
					<input id="account" name="account" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">密码：</label>
				<div class="col-sm-8">
					<input id="password" name="password" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">视频流地址：</label>
				<div class="col-sm-8">
					<input id="rtspUrl" name="rtspUrl" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">备注：</label>
				<div class="col-sm-8">
					<input id="remark" name="remark" class="form-control" type="text">
				</div>
			</div>
<!--			<div class="form-group">	-->
<!--				<label class="col-sm-3 control-label">0:正常,1:删除：</label>-->
<!--				<div class="col-sm-8">-->
<!--					<input id="delFlag" name="delFlag" class="form-control" type="text">-->
<!--				</div>-->
<!--			</div>-->
<!--			<div class="form-group">	-->
<!--				<label class="col-sm-3 control-label">创建者：</label>-->
<!--				<div class="col-sm-8">-->
<!--					<input id="createBy" name="createBy" class="form-control" type="text">-->
<!--				</div>-->
<!--			</div>-->
<!--			<div class="form-group">	-->
<!--				<label class="col-sm-3 control-label">创建时间：</label>-->
<!--				<div class="col-sm-8">-->
<!--					<input id="createTime" name="createTime" class="form-control" type="text">-->
<!--				</div>-->
<!--			</div>-->
<!--			<div class="form-group">	-->
<!--				<label class="col-sm-3 control-label">更新者：</label>-->
<!--				<div class="col-sm-8">-->
<!--					<input id="updateBy" name="updateBy" class="form-control" type="text">-->
<!--				</div>-->
<!--			</div>-->
<!--			<div class="form-group">	-->
<!--				<label class="col-sm-3 control-label">更新时间：</label>-->
<!--				<div class="col-sm-8">-->
<!--					<input id="updateTime" name="updateTime" class="form-control" type="text">-->
<!--				</div>-->
<!--			</div>-->
		</form>
	</div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "project/proCamera"
		$("#form-proCamera-add").validate({
			// rules:{
			// 	xxxx:{
			// 		required:true,
			// 	},
			// }
			rules: {
				cameraCode: {
					required: true,
				},
				cameraName: {
					required: true,
				},
				account: {
					required: true,
				},
				password: {
					required: true,
				}
			},
			messages: {
				cameraCode: {
					required: "请输入摄像头编码",
				},
				cameraName: {
					required: "请输入摄像头名称",
				},
				account: {
					required: "请输入账号",
				},
				password: {
					required: "请输入密码",
				}
			}
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/add", $('#form-proCamera-add').serialize());
	        }
	    }
	</script>
</body>
</html>
